import http from "@/api/http";

export function getPage(query: object) {
  return http.get({
    url: "/content/article/page",
    params: query
  });
}

export function getArticle(id: number) {
  return http.get({
    url: "/content/article/" + id
  });
}

export function saveArticle(obj: object) {
  return http.post({
    url: "/content/article",
    data: obj
  });
}

export function updateArticle(obj: object) {
  return http.put({
    url: "/content/article",
    data: obj
  });
}

export function delArticles(ids: any) {
  return http.delete({
    url: "/content/article/" + ids
  });
}
